using System;
using System.Collections.Generic;

using AppPriceLive.Entities.Utils;
using AppPriceLive.Entities.Models;
using AppPriceLive.DAL;
using AppPriceLive.Common;

namespace AppPriceLive.Biz
{
	public class ImagePRService
	{
		/// <summary>
		/// Saves a record to the ImagePR table.
		/// </summary>
		public virtual void Insert(ImagePRInfo imagePRInfo)
		{
			try
			{
				new ImagePRDAO().Insert(imagePRInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - Insert", ex);
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the ImagePR table.
		/// </summary>
		public virtual void Update(ImagePRInfo imagePRInfo)
		{
			try
			{
				new ImagePRDAO().Update(imagePRInfo);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - Update", ex);
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the ImagePR table.
		/// </summary>
		public virtual void Delete(int? imgId)
		{
			try
			{
				new ImagePRDAO().Delete(imgId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - Delete", ex);
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the ImagePR table.
		/// </summary>
		public virtual ImagePRInfo Select(int? imgId)
		{
			try
			{
				return new ImagePRDAO().Select(imgId);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - Select", ex);
				throw;
			}

		}
        /// <summary>
        /// Selects a single record from the ImagePR table. 
        /// </summary>
        /// <param name="DateQuery"></param>
        /// <returns></returns>
        public virtual ImagePRInfo SelectDateQuery(DateTime DateQuery)
		{
			try
			{
				return new ImagePRDAO().SelectDateQuery(DateQuery);
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - SelectDateQuery", ex);
				throw;
			}

		}
		/// <summary>
		/// Selects all records from the ImagePR table.
		/// </summary>
		public List<ImagePRInfo> SelectAll()
		{
			try
			{
				return new ImagePRDAO().SelectAll();
			}
			catch (Exception ex)
			{
				Logger.Error("AppPriceLive.Biz.ImagePR - SelectAll", ex);
				throw;
			}

		}

	}
}
